public class EYIBCException extends Exception{

	private static final long serialVersionUID = 1L;
	private int m_status;
    private String m_message;
    
    public static final int EYIBCLIB_SUCCESS						= 1;
    public static final int XENGINE_MGMT_ERR_BASE					= 0xFFFFF000;
    public static final int XENGINE_MGMT_ERR_NO_MEM					= (XENGINE_MGMT_ERR_BASE-1);
    public static final int XENGINE_MGMT_ERR_ARGUMENT				= (XENGINE_MGMT_ERR_BASE-2);
    public static final int XENGINE_MGMT_ERR_OTLS_CONTEXT			= (XENGINE_MGMT_ERR_BASE-3);
    public static final int XENGINE_MGMT_ERR_OTLS_CONNECT			= (XENGINE_MGMT_ERR_BASE-4);
    public static final int XENGINE_MGMT_ERR_FRONT_THREAD			= (XENGINE_MGMT_ERR_BASE-5);
    public static final int XENGINE_MGMT_ERR_PACKET_TYPE			= (XENGINE_MGMT_ERR_BASE-6);
    public static final int XENGINE_MGMT_ERR_NO_CONNECT				= (XENGINE_MGMT_ERR_BASE-7);
    public static final int XENGINE_MGMT_ERR_NO_RESPONSE			= (XENGINE_MGMT_ERR_BASE-8);
    public static final int XENGINE_MGMT_ERR_INVALID_PKT			= (XENGINE_MGMT_ERR_BASE-9);
    public static final int XENGINE_MGMT_ERR_SEND_FAIL				= (XENGINE_MGMT_ERR_BASE-10);
    public static final int XENGINE_MGMT_ERR_INTERNAL				= (XENGINE_MGMT_ERR_BASE-11);
    
    public static final int XENGINE_NOT_LOADED						= (XENGINE_MGMT_ERR_BASE-100);
    
    public static final int GM_ERROR_BASE							= 0;
    public static final int GM_ERROR_MEMORY_FAILURE					= GM_ERROR_BASE - 1;		// 内存错误
    public static final int GM_ERROR_INVALID_ID_ATTR				= GM_ERROR_BASE - 2;		// 无效的标识属性
    public static final int GM_ERROR_IDLIST_COUNT_OVERFLOW			= GM_ERROR_BASE - 3;		// 非法标识计数
    public static final int GM_ERROR_INVALID_LIBCTX_ATTR			= GM_ERROR_BASE - 4;		// 无效的密码引擎属性
    public static final int GM_ERROR_INVALID_ID						= GM_ERROR_BASE - 5;		// 无效的标识
    public static final int GM_ERROR_INVALID_IDLIST					= GM_ERROR_BASE - 6;		// 无效的标识列表
    public static final int GM_ERROR_INVALID_LIBCTX					= GM_ERROR_BASE - 7;		// 无效的密码引擎属性
    public static final int GM_ERROR_INVALID_PKCS7OBJECT			= GM_ERROR_BASE - 8;		// 无效的PKCS7对象
    public static final int GM_ERROR_INVALID_PKCS7OBJ_ATTR			= GM_ERROR_BASE - 9;		// 无效的PKCS7对象属性
    public static final int GM_ERROR_PKCS7OBJ_READ_GENERAL			= GM_ERROR_BASE - 10;		// PKCS7解码错误
    public static final int GM_ERROR_PKCS7OBJ_READ_CHOOSE_RECIPIENT	= GM_ERROR_BASE - 11;		// 需选择PKCS7的解码人
    public static final int GM_ERROR_PKCS7OBJ_READ_VERSION			= GM_ERROR_BASE - 12;		// 不支持PKCS7的版本
    public static final int GM_ERROR_IBCPARAMLIST_COUNT_OVERFLOW	= GM_ERROR_BASE - 13;		// 无效的IBC系统参数对象计数
    public static final int GM_ERROR_GENERAL						= GM_ERROR_BASE - 14;		// 未知错误
    //	public static final int GM_ERROR_PUBKEY_FAILURE 		GM_ERROR_BASE-15 //
    public static final int GM_ERROR_INVALID_IBCPARAM				= GM_ERROR_BASE - 16;		// 无效的IBC系统参数
    public static final int GM_ERROR_BUFFER_TOO_SMALL				= GM_ERROR_BASE - 17;		// 缓冲过小
    public static final int GM_ERROR_PKCS7OBJ_WRITE_ORDER			= GM_ERROR_BASE - 18;		// PKCS7编码过程操作顺序错误
    public static final int GM_ERROR_KEYEXPORT_FAILURE				= GM_ERROR_BASE - 19;		// 加密会话密钥错误
    public static final int GM_ERROR_KEYIMPORT_FAILURE				= GM_ERROR_BASE - 20;		// 解密会话密钥错误
    //	public static final int GM_ERROR_KEYGEN_FAILURE			GM_ERROR_BASE-21 //
    public static final int GM_ERROR_INVALID_HASH_ALG				= GM_ERROR_BASE - 22;		//无效的HASH算法
    public static final int GM_ERROR_DEVICE_UNSUPPORTED				= GM_ERROR_BASE - 23;		//不支持指定类型设备
    public static final int GM_ERROR_DEVICE_OPERATION				= GM_ERROR_BASE - 24;		//设备操作失败
    //	public static final int GM_ERROR_INVALID_SECKEY_ATTR	GM_ERROR_BASE-25
    //  public static final int GM_ERROR_INVALID_HASH_ATTR		GM_ERROR_BASE-26
    public static final int GM_ERROR_SIGNING_FAILURE				= GM_ERROR_BASE - 27;	//签名失败
    public static final int GM_ERROR_WRONG_KEYTYPE					= GM_ERROR_BASE - 28;	//错误的密钥类型
    public static final int GM_ERROR_ALG_UNSUPPORTED				= GM_ERROR_BASE - 29;	//不支持指定的算法
    public static final int GM_ERROR_MISSING_KEY					= GM_ERROR_BASE - 30;	//未指定密钥
    public static final int GM_ERROR_SIGNATURE_VERIFICATION			= GM_ERROR_BASE - 31;	//验证签名失败
    public static final int GM_ERROR_INVALID_CERTIFICATE			= GM_ERROR_BASE - 32;	//无效的证书
    public static final int GM_ERROR_CURVE_UNSUPPORTED				= GM_ERROR_BASE - 33;	//不支持指定的曲线类型
    public static final int GM_ERROR_PARAM_GENERATION				= GM_ERROR_BASE - 34;	//IBC系统参数生成错误
    public static final int GM_ERROR_SCHEMA_UNSUPPORTED				= GM_ERROR_BASE - 35;	//不支持指定的标识编码方式
    public static final int GM_ERROR_OPEN_FILE						= GM_ERROR_BASE - 36;	//打开文件错误
    public static final int GM_ERROR_CORRUPTED_PARAM				= GM_ERROR_BASE - 37;	//IBC参数破坏
    public static final int GM_ERROR_INCOMPLETE_IBCPRVKEY			= GM_ERROR_BASE - 38;	//不完整的IBC私钥
    public static final int GM_ERROR_SYSPARAM_MISSING				= GM_ERROR_BASE - 39;	//缺少IBC系统参数
    public static final int GM_ERROR_ENCODETYPE_UNSUPPORTED			= GM_ERROR_BASE - 40;	//不支持指定的标识编码类型
    public static final int GM_ERROR_MISSING_ID						= GM_ERROR_BASE - 41;	//缺少标识信息
    public static final int GM_ERROR_DEV_CONTAINTER					= GM_ERROR_BASE - 42;	//创建设备容器错误
    public static final int GM_ERROR_DEV_KEY						= GM_ERROR_BASE - 43;	//创建设备密钥错误
    public static final int GM_ERROR_DEV_KEYPARAM					= GM_ERROR_BASE - 44;	//设备密钥参数操作错误
    public static final int GM_ERROR_PARAM_UNSUPPORTED				= GM_ERROR_BASE - 45;	//不支持指定的对象参数
    public static final int GM_ERROR_OPERATION_UNSUPPORTED			= GM_ERROR_BASE - 46;	//不支持指定的操作
    public static final int GM_ERROR_PKCS7OBJ_MISSING_ATTR			= GM_ERROR_BASE - 47;	//未设置PKCS7必需的属性
    public static final int GM_ERROR_BER_ENCODE						= GM_ERROR_BASE - 48;	//二进制编码错误
    public static final int GM_ERROR_BER_DECODE						= GM_ERROR_BASE - 49;	//二进制解码错误
    public static final int GM_ERROR_INVALID_MAC					= GM_ERROR_BASE - 50;	//无效的消息认证码
    public static final int GM_ERROR_INVALID_IBCPUBKEY				= GM_ERROR_BASE - 51;	//无效的IBC公钥
    public static final int GM_ERROR_PKCS7OBJ_READ_ORDER			= GM_ERROR_BASE - 52;	//PKCS7解码过程操作顺序错误
    public static final int GM_ERROR_PKCS7OBJ_OPT_UNSUPPORTED		= GM_ERROR_BASE - 53;	//PKCS7对象不支持指定的属性选项
    public static final int GM_ERROR_CORRUPTED_FILE					= GM_ERROR_BASE - 54;	//被破坏的文件
    public static final int GM_ERROR_ALG_INTERNAL					= GM_ERROR_BASE - 55;	//算法内部错误
    public static final int GM_ERROR_INVALID_IDDATA					= GM_ERROR_BASE - 56;	//无效的标识数据
    public static final int GM_ERROR_CORRUPTED_PRVKEY				= GM_ERROR_BASE - 58;	//被破坏的私钥
    public static final int GM_ERROR_INVALID_TIME					= GM_ERROR_BASE - 59;	//无效的时间数据
    public static final int GM_ERROR_DEVICE_PIN						= GM_ERROR_BASE - 60;	//设备PIN码错误
    public static final int GM_ERROR_INVALID_IBCPARAM_ATTR			= GM_ERROR_BASE - 61;	//无效的IBC参数属性
    public static final int GM_ERROR_INVALID_PUBKEY_ATTR			= GM_ERROR_BASE - 62;	//无效的公钥属性
    public static final int GM_ERROR_INVALID_PRVKEY_ATTR			= GM_ERROR_BASE - 63;	//无效的私钥属性
    public static final int GM_ERROR_ENCODING						= GM_ERROR_BASE - 64;	//编码错误
    public static final int GM_ERROR_INVALID_PARAM					= GM_ERROR_BASE - 65;	//无效的参数或IBC系统参数
    public static final int GM_ERROR_WIN_CRYPTO						= GM_ERROR_BASE - 66;	//WINDOWS CSP 操作失败
    public static final int GM_ERROR_PRVKEYLIST_COUNT_OVERFLOW		= GM_ERROR_BASE - 67;	//私钥对象计数错误
    public static final int	GM_ERROR_LOADING_PRVKEY					= GM_ERROR_BASE - 68;	//加载私钥错误
    public static final int GM_ERROR_ACTIVIATION_FAILED				= GM_ERROR_BASE - 69;	//激活失败
    public static final int GM_ERROR_IBCKEYDEACTIVIATED				= GM_ERROR_BASE - 70;	//被禁止的IBC私钥
    public static final int GM_ERROR_LOADING_CERTIFICATE			= GM_ERROR_BASE - 71;	//加载证书失败
    public static final int GM_ERROR_VALUE_NOTSET					= GM_ERROR_BASE - 72;	//值未设置
    public static final int GM_ERROR_NETWORK_FAILURE				= GM_ERROR_BASE - 73;	//网络错误
    public static final int GM_ERROR_ILLFORM_MSG					= GM_ERROR_BASE - 74;	//不合法的消息
    public static final int GM_ERROR_UNKNOWN_POLICY					= GM_ERROR_BASE - 75;	//未知的策略
    public static final int GM_ERROR_CORRUPTED_POLICY				= GM_ERROR_BASE - 76;	//被破坏的策略
    public static final int	GM_ERROR_INVALID_PUBKEYFILE				= GM_ERROR_BASE - 77;	//无效的公钥文件
    public static final int GM_ERROR_SSS_WRONGLEN					= GM_ERROR_BASE - 78;	//错误的密钥分散长度
    public static final int GM_ERROR_SSS_WRONGFORMAT				= GM_ERROR_BASE - 79;	//错误的密钥分散数据格式
    public static final int GM_ERROR_SSS_RESTOREFAILED				= GM_ERROR_BASE - 80;	//Shamir秘密恢复操作失败
    public static final int GM_ERROR_MISSING_PARAM					= GM_ERROR_BASE - 81;	//对称密钥属性未设置
    public static final int GM_ERROR_VALUE_ALREADY_SET				= GM_ERROR_BASE - 82;	//值已经被设置
    public static final int GM_ERROR_CERT_MISMATCH					= GM_ERROR_BASE - 83;	//证书不匹配
    public static final int GM_ERROR_DEV_PARAM						= GM_ERROR_BASE - 84;	//无效的设备参数
    public static final int GM_ERROR_DEV_NOCONTAINER				= GM_ERROR_BASE - 85;	//设备中无更多容器
    public static final int GM_ERROR_MISSING_DEV					= GM_ERROR_BASE - 86;	//无设备
    public static final int GM_ERROR_DATA_FORMAT					= GM_ERROR_BASE - 87;	//数据格式错误
    public static final int GM_ERROR_POLICY_UNSUPPORTED				= GM_ERROR_BASE - 88;	//不支持指定的策略
    public static final int GM_ERROR_AUTH_ATTR_UNSUPPORTED			= GM_ERROR_BASE - 89;	//不支持指定的认证属性
    public static final int GM_ERROR_MISSING_CERT					= GM_ERROR_BASE - 90;	//缺少证书
    public static final int GM_ERROR_INVALID_VER					= GM_ERROR_BASE - 91;	//无效的版本
    public static final int GM_ERROR_INVALID_ATTR					= GM_ERROR_BASE - 92;	//无效的属性
    public static final int GM_ERROR_INVALID_PASSWD					= GM_ERROR_BASE - 93;	//无效的口令
    public static final int GM_ERROR_MSG_MODIFIED					= GM_ERROR_BASE - 94;	//消息被修改
    public static final int GM_ERROR_DEVICE_LOCKED					= GM_ERROR_BASE - 95;	//设备被锁定
    public static final int GM_ERROR_STREAM_OPT						= GM_ERROR_BASE - 96;	//流操作失败
    public static final int GM_ERROR_MAIL_ANALYSE					= GM_ERROR_BASE - 97;	//邮件解析失败
    public static final int GM_ERROR_P7_CANCELED					= GM_ERROR_BASE - 98;	//P7取消
    public static final int GM_ERROR_NEED_MORE_DATA					= GM_ERROR_BASE - 100;	//需要更多的处理数据
    public static final int GM_ERROR_LACK_DATA_TO_VERIFY			= GM_ERROR_BASE - 101;	//需数据进行验证签名
    public static final int GM_ERROR_ALREADY_FINISHED				= GM_ERROR_BASE - 102;	//操作已经完成
    public static final int GM_ERROR_VERIFYING_FAILURE				= GM_ERROR_BASE - 103;	//验证签名失败
    public static final int GM_ERROR_SECRETOP_FAILURE				= GM_ERROR_BASE - 104;	//对称操作失败
    public static final int GM_ERROR_CREATE_TMPFILE_FAILURE			= GM_ERROR_BASE - 105;	//生成临时文件失败
    public static final int GM_ERROR_LOCK_FAILURE					= GM_ERROR_BASE - 106;	//锁操作失败
    public static final int GM_ERROR_PRVKEY_REVOKED					= GM_ERROR_BASE - 107;	//私钥已经撤销
    public static final int GM_ERROR_KEYREQT_INTERNAL				= GM_ERROR_BASE - 200;	//策略私钥请求内部错误
    public static final int GM_ERROR_KEYREQT_UNQUALIFIED			= GM_ERROR_BASE - 201;	//策略未满足
    public static final int GM_ERROR_KEYREQT_ILLFORMQUERY			= GM_ERROR_BASE - 202;	//无效的策略
    public static final int GM_ERROR_VERIFICATION_FAILED			= GM_ERROR_BASE - 300;	//验证失败
    public static final int GM_ERROR_CONTAINER_EXIST				= GM_ERROR_BASE - 500;	//容器已经存在
    public static final int GM_ERROR_DEVICE_FULL					= GM_ERROR_BASE - 501;	//设备已满
    public static final int GM_ERROR_UNKNOWN						= GM_ERROR_BASE - 502;	//未知设备错误
    public static final int GM_ERROR_DEVICE_NOTEXIST				= GM_ERROR_BASE - 503;	//设备不存在
    public static final int GM_ERROR_DEVICE_COMM					= GM_ERROR_BASE - 504;	//设备未知错误
    public static final int GM_ERROR_DEVICE_OPEN					= GM_ERROR_BASE - 505;	//打开设备设备
    public static final int GM_ERROR_DEVICE_AUTH					= GM_ERROR_BASE - 506;	//设备身份认证失败
    public static final int GM_ERROR_SMSGATE_UNAVL					= GM_ERROR_BASE - 507;	//SMS Gate 不存在
    public static final int GM_ERROR_LICENSE_NONE					= GM_ERROR_BASE - 508;	//未配置LICENSE或无有效LICENSE
    public static final int GM_ERROR_INVALID_LICENSE				= GM_ERROR_BASE - 509;	//无效的LICENSE
    public static final int GM_ERROR_LICENSE_EXIST					= GM_ERROR_BASE - 510;	//LICENSE已经存在
    
    
    public static final int GM_ERROR_NOT_LOADED						= GM_ERROR_BASE - 8888;
    
    
    public static final int SDR_ERROR_OFFSET						= 1;
    public static final int SDR_UNKNOWERR							= SDR_ERROR_OFFSET + 0x00000001;
    public static final int SDR_NOTSUPPORT							= SDR_ERROR_OFFSET + 0x00000002;
    public static final int SDR_COMMFAIL							= SDR_ERROR_OFFSET + 0x00000003;
    public static final int SDR_HARDFAIL							= SDR_ERROR_OFFSET + 0x00000004;
    public static final int SDR_OPENDEVICE							= SDR_ERROR_OFFSET + 0x00000005;
    public static final int SDR_OPENSESSION							= SDR_ERROR_OFFSET + 0x00000006;
    public static final int SDR_PARDENY								= SDR_ERROR_OFFSET + 0x00000007;
    public static final int SDR_KEYNOTEXIST							= SDR_ERROR_OFFSET + 0x00000008;
    public static final int SDR_ALGNOTSUPPORT						= SDR_ERROR_OFFSET + 0x00000009;
    public static final int SDR_ALGMODNOTSUPPORT					= SDR_ERROR_OFFSET + 0x0000000A;
    public static final int SDR_PKOPERR								= SDR_ERROR_OFFSET + 0x0000000B;
    public static final int SDR_SKOPERR								= SDR_ERROR_OFFSET + 0x0000000C;
    public static final int SDR_SIGNERR								= SDR_ERROR_OFFSET + 0x0000000D;
    public static final int SDR_VERIFYERR							= SDR_ERROR_OFFSET + 0x0000000E;
    public static final int SDR_SYMOPERR							= SDR_ERROR_OFFSET + 0x0000000F;
    public static final int SDR_STEPERR								= SDR_ERROR_OFFSET + 0x00000010;
    public static final int SDR_FILESIZEERR							= SDR_ERROR_OFFSET + 0x00000011;    
    public static final int SDR_FILENOEXIST							= SDR_ERROR_OFFSET + 0x00000012;
    public static final int SDR_FILEOFSERR							= SDR_ERROR_OFFSET + 0x00000013;
    public static final int SDR_KEYTYPEERR							= SDR_ERROR_OFFSET + 0x00000014;
    public static final int SDR_KEYERR								= SDR_ERROR_OFFSET + 0x00000015;      
    

 
    public EYIBCException(int status)
    {
        m_status = status;
        String prefix = Integer.toString(status) + ": ";

        if (m_status == XENGINE_MGMT_ERR_NO_MEM) {
            m_message = prefix + "内存不足";
            return; }
        if (m_status == XENGINE_MGMT_ERR_ARGUMENT) {
            m_message = prefix + "参数错误";
            return; }
        if (m_status == XENGINE_MGMT_ERR_OTLS_CONTEXT) {
            m_message = prefix + "OTLS环境错误";
            return; }
        if (m_status == XENGINE_MGMT_ERR_OTLS_CONNECT) {
            m_message = prefix + "OTLS连接错误";
            return; }
        if (m_status == XENGINE_MGMT_ERR_FRONT_THREAD) {
            m_message = prefix + "线程错误";
            return; }
        if (m_status == XENGINE_MGMT_ERR_PACKET_TYPE) {
            m_message = prefix + "数据包错误";
            return; }
        if (m_status == XENGINE_MGMT_ERR_NO_CONNECT) {
            m_message = prefix + "无连接";
            return; }
        if (m_status == XENGINE_MGMT_ERR_NO_RESPONSE) {
            m_message = prefix + "无响应";
            return; }
        if (m_status == XENGINE_MGMT_ERR_INVALID_PKT) {
            m_message = prefix + "无效的公钥类型";
            return; }
        if (m_status == XENGINE_MGMT_ERR_SEND_FAIL) {
            m_message = prefix + "发送出错";
            return; }
        if (m_status == XENGINE_MGMT_ERR_INTERNAL) {
            m_message = prefix + "内部错误";
            return; }
        if (m_status == XENGINE_NOT_LOADED) {
            m_message = prefix + "函数库未加载";
            return; }
        if (m_status == GM_ERROR_CONTAINER_EXIST) {
            m_message = prefix + "DEV：容器已经存在";
            return; }
        if (m_status == GM_ERROR_DEVICE_FULL) {
            m_message = prefix + "DEV：设备已满";
            return; }
        if (m_status == GM_ERROR_UNKNOWN) {
            m_message = prefix + "DEV：未知设备错误";
            return; }
        if (m_status == GM_ERROR_DEVICE_NOTEXIST) {
            m_message = prefix + "DEV：设备不存在";
            return; }
        if (m_status == GM_ERROR_DEVICE_COMM) {
            m_message = prefix + "DEV：和设备通讯错误";
            return; }
        if (m_status == GM_ERROR_DEVICE_OPEN) {
            m_message = prefix + "DEV：打开设备设备";
            return; }
        if (m_status == GM_ERROR_DEVICE_AUTH) {
            m_message = prefix + "DEV：设备身份认证失败";
            return; }
        if (m_status == GM_ERROR_SMSGATE_UNAVL) {
            m_message = prefix + "DEV：SMS Gate 不存在";
            return; }
        if (m_status == GM_ERROR_LICENSE_NONE) {
            m_message = prefix + "DEV：未配置LICENSE或无有效LICENSE";
            return; }
        if (m_status == GM_ERROR_INVALID_LICENSE) {
            m_message = prefix + "DEV：无效的LICENSE";
            return; }
        if (m_status == GM_ERROR_LICENSE_EXIST) {
            m_message = prefix + "DEV：LICENSE已经存在";
            return; }        
        if (m_status == SDR_UNKNOWERR) {
            m_message = prefix + "SDR：未知错误";
            return; }
        if (m_status == SDR_NOTSUPPORT) {
            m_message = prefix + "SDR：不支持的接口调用";
            return; }
        if (m_status == SDR_COMMFAIL) {
            m_message = prefix + "SDR：与设备通信失败";
            return; }
        if (m_status == SDR_HARDFAIL) {
            m_message = prefix + "SDR：运算模块无响应";
            return; }
        if (m_status == SDR_OPENDEVICE) {
            m_message = prefix + "SDR：打开设备失败";
            return; }
        if (m_status == SDR_OPENSESSION) {
            m_message = prefix + "SDR：创建会话失败";
            return; }
        if (m_status == SDR_PARDENY) {
            m_message = prefix + "SDR：无私钥使用权限";
            return; }
        if (m_status == SDR_KEYNOTEXIST) {
            m_message = prefix + "SDR：不存在的密钥调用";
            return; }
        if (m_status == SDR_ALGNOTSUPPORT) {
            m_message = prefix + "SDR：不支持的算法调用";
            return; }
        if (m_status == SDR_ALGMODNOTSUPPORT) {
            m_message = prefix + "SDR：不支持的算法模式调用";
            return; }
        if (m_status == SDR_PKOPERR) {
            m_message = prefix + "SDR：公钥运算失败";
            return; }
        if (m_status == SDR_SKOPERR) {
            m_message = prefix + "SDR：私钥运算失败";
            return; }
        if (m_status == SDR_SIGNERR) {
            m_message = prefix + "SDR：签名运算失败或访问密码错误或已无可用License";
            return; }
        if (m_status == SDR_VERIFYERR) {
            m_message = prefix + "SDR：验证签名失败";
            return; }
        if (m_status == SDR_SYMOPERR) {
            m_message = prefix + "SDR：对称算法运算失败";
            return; }
        if (m_status == SDR_STEPERR) {
            m_message = prefix + "SDR：多步运算步骤错误";
            return; }
        if (m_status == SDR_FILESIZEERR) {
            m_message = prefix + "SDR：文件长度超出限制";
            return; }
        if (m_status == SDR_FILENOEXIST) {
            m_message = prefix + "SDR：指定的文件不存在";
            return; }
        if (m_status == SDR_FILEOFSERR) {
            m_message = prefix + "SDR：文件起始位置错误";
            return; }
        if (m_status == SDR_KEYTYPEERR) {
            m_message = prefix + "SDR：密钥类型错误";
            return; }
        if (m_status == SDR_KEYERR) {
            m_message = prefix + "SDR：密钥错误";
            return; }
        if (m_status == GM_ERROR_INVALID_IBCPARAM) {
            m_message = prefix + "无效的IBC系统参数";
            return; }
        if (m_status == GM_ERROR_DATA_FORMAT) {
            m_message = prefix + "数据格式错误";
            return; }
        if (m_status == GM_ERROR_PRVKEY_REVOKED) {
            m_message = prefix + "私钥已经撤销";
            return; }
        if (m_status == GM_ERROR_VERIFICATION_FAILED) {
            m_message = prefix + "验证签名失败";
            return; }
        if (m_status <= -1 || m_status >=-600){
            m_message = prefix + "GM_ERROR";
            return; }
        m_message = prefix + "Unknown Exception ?!?!";
    }

    public int getStatus()
    {
        return m_status;
    }

    public String getMessage()
    {
        return m_message;
    }
}
